<% form_for :datasheet, :url => datasheets_path, :html => { :multipart => true } do |f| %>
	<fieldset>
		<legend>Upload Datasheet for "<%= params[:controller_type].singularize.capitalize.constantize.find(params[:id]).name %>"</legend>
		<p><%= error_messages_for :datasheet %></p>
		<p>
			<label for="datasheet">Browse for Datasheet</label>
			<br/>
			<%= f.file_field :uploaded_data, :class => :input_line %>
		</p>
		<p>
			<label for="name">Name (required)</label>
			<br/>
			<%= f.text_field :name, :class => :input_line %>
		</p>
		<%= hidden_field_tag :controller_type, params[:controller_type] %>
		<%= hidden_field_tag :id, params[:id] %>
  	<ul class="right">
			<li class="horizontal"><%= link_to "Cancel", :controller => params[:controller_type], :action => :show, :id => params[:id] %></li>
			<li class="horizontal">|</li>
	    <li class="horizontal"><%= submit_tag "Ok" %></li>
	  </ul>
		<br/>
	</fieldset>
<% end %>